home *** CD-ROM | disk | FTP | other *** search
- %
- % @(#)phoney_InStream.X 1.2 6/17/87
- %
- export _InStreamObject to "Builtins"
-
- const _InStreamObject == immutable object _InStreamObject
- export getSignature, create
- const InStreamType == type InStreamType
- operation getChar -> [Character]
- operation unGetChar [ Character ]
- operation getString -> [ String ]
- function eos -> [Boolean]
- operation close
- end InStreamType
- function getSignature -> [ r : Signature ]
- r <- InStreamType
- end getSignature
- operation create [ fd : Integer ] -> [r : InStreamType]
- r <- object aStream
- export getChar, unGetChar, getString, eos, close
- const myFD : Integer == fd
- monitor
- operation getChar -> [r : Character]
- r <- 'a'
- end getChar
- operation unGetChar [r : Character]
- end unGetChar
- operation getString -> [r : String]
- r <- "this is a line\^J"
- end getString
- function eos -> [r : Boolean]
- r <- true
- end eos
- operation close
- end close
- end monitor
- end aStream
- end create
- end _InStreamObject
-